import axios from 'axios';

// 获取购物车列表
export function getCartList(params) {
    return axios({
        url:'/shoppingCart/page',
        method: 'get',
        params
    });
}

// 添加商品到购物车
export function addCart(data) {
    return axios({
        url: '/shoppingCart/add',
        method: 'post',
        data
    });

}
// 删除一条购物车记录
export function deleteCart(params) {
    return axios({
        url: '/shoppingCart/'+params,
        method: 'delete',
    });
}
// 批量删除购物车记录
export function deleteBatchCart(data) {
    return axios({
        url: '/shoppingCart/deleteBatchCart',
        method: 'post',
        data
    });
    
}
